package com.fruit.controller.wap.farmwork;

import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.fruit.pojo.user.SysUser;

@Controller
@RequestMapping(value = "/wap/test")
public class ForDerict {
	@RequestMapping(value = "/ses")
	public ModelAndView getSession (HttpSession session){
		ModelAndView mv=new ModelAndView();
		SysUser sysUser =(SysUser)session.getAttribute("sysUser");	
		System.out.println("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@userId:"+sysUser.getUserId());
		System.out.println("userName:"+sysUser.getUserName());
		System.out.println("baseId:"+sysUser.getBaseId());
		System.out.println("baseName:"+sysUser.getBaseName());
		mv.setViewName("index");
		mv.addObject("userId", sysUser.getUserId());
		mv.addObject("userName", sysUser.getUserName());
		mv.addObject("baseId", sysUser.getBaseId());
		mv.addObject("baseName", sysUser.getBaseName());
		
		return mv;
	}
}
